package com.zyk.scaffold.common.utils;

public class BusinessUtil {

    /**
     * 手机号 脱敏
     * @param mobile
     * @return
     */
    public static String mobileDesensitization(String mobile) {
        if (StringUtils.isEmpty(mobile) || (mobile.trim().length() != 11)) {
            return mobile;
        }
        return mobile.trim().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");
    }
}
